import requests
import re
str="https://www.sanchuangedu.cn"
result=requests.get("https://www.sanchuangedu.cn/")
# print(result.text)
ret=re.findall(r"(?:img\ssrc=\")(.*?)\"",result.text)
print(ret)
print(len(ret))
n=0
for i in ret:
    st=i.split(".")
    n+=1
    if str in i:
        fp.write(i)
    else:
        i="".join([str,i])
    request=requests.get(i)
    fp=open(f"img/{n}.{st[1]}","wb")
    fp.write(request.content)#########下载图片